// Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
// This source file is part of the Cangjie project, licensed under Apache-2.0
// with Runtime Library Exception.
//
// See https://cangjie-lang.cn/pages/LICENSE for license information.

#ifndef CANGJIE_MIGRATOR_RULES_IMPORT_RULE
#define CANGJIE_MIGRATOR_RULES_IMPORT_RULE

#include <vector>
#include <string>

#include "PackageExpression.h"
#include "TomlFile.h"

namespace CangjieMigrator::Rules {

class ImportRule {
public:
    explicit ImportRule(const TomlConfig &config);

    [[nodiscard]] bool HasAdd() const;
    [[nodiscard]] bool HasRemove() const;
    [[nodiscard]] bool HasElement() const;
    [[nodiscard]] bool CanUpdate() const;

    [[nodiscard]] const std::vector<PackageExpression> &GetRemove() const;
    [[nodiscard]] const std::vector<PackageExpression> &GetAdd() const;

    [[nodiscard]] std::string ToString() const;

private:
    std::vector<PackageExpression> remove;
    std::vector<PackageExpression> add;
};

} // namespace CangjieMigrator::Rules

#endif // CANGJIE_MIGRATOR_RULES_IMPORT_RULE